import os
import json
if not os.path.exists(r"d:/homework/chapter10"):
    os.makedirs(r"d:/homework/chapter10")
os.chdir(r"d:/homework/chapter10")
f=open("profile.json","w")
a={"name":"bob","学号":"21212121","年龄":"18","身高":"185","学校":"kdpt"}
js=json.dumps(a)
f.write(js)
f.close()

